import PySide6
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QWidget, QVBoxLayout, QMainWindow, QPushButton


class Center_Widget(QMainWindow):
    def __init__(self, parent=None):
        super(Center_Widget, self).__init__()
        # self.layout = QVBoxLayout(self)
        self.table_info = parent.table_info
        self.signal_table_info = parent.signal_table_info
        self.signal_operat = parent.signal_operat
        self.queue_logging = parent.queue_logging
        # self.widget = QWidget()
        # self.setCentralWidget(self.widget)
        # self.layout = QVBoxLayout(self.widget)
        # self.layout.addWidget(QPushButton('你好'))
        self.setContextMenuPolicy(Qt.ContextMenuPolicy.NoContextMenu)

    def showEvent(self, event:PySide6.QtGui.QShowEvent) -> None:
        """ 重载show事件，避免出现两个界面 """
        pass